﻿// MFCApplication2Doc.h: CMFCApplication2Doc 类的接口
//

#pragma once

#include "CCommand.h"

class CMFCApplication2Doc : public CDocument
{
protected: // 仅从序列化创建
	CMFCApplication2Doc() noexcept;
	DECLARE_DYNCREATE(CMFCApplication2Doc)

	Handle(AIS_InteractiveContext) GetContext() { return myAISContext; }

	// 特性
public:

	// 操作
public:

	// 重写
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
#ifdef SHARED_HANDLERS
	virtual void InitializeSearchContent();
	virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds);
#endif // SHARED_HANDLERS

	Handle(V3d_Viewer) GetViewer(void) { return myViewer; }

	// 实现
public:
	virtual ~CMFCApplication2Doc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

	Handle(AIS_InteractiveContext) myAISContext;
	Handle(V3d_Viewer)	myViewer;

	UndoManager		m_undoMgr;

	// 生成的消息映射函数
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnDemoPlane();

#ifdef SHARED_HANDLERS
	// 用于为搜索处理程序设置搜索内容的 Helper 函数
	void SetSearchContent(const CString& value);
#endif // SHARED_HANDLERS
public:
	afx_msg void OnEditUndo();
	afx_msg void OnDemoCylinder();
	afx_msg void OnEditRedo();
	afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
	afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
};
